< previous page page_452 next page >

Page 452
After you learn how to use the data-bound list, combo box, and grid, you'll use them to create a new custom control that provides an easy ''find" dialog for all your data entry forms. You also learn how to build a data entry Subform that combines all three controls on a single form.
The Data-Bound List and Combo Boxes
The data-bound list and combo controls are used in conjunction with the data control to allow you to display multiple rows of data in the same control. This provides you with a pick list of values displayed in a list or combo box. You can use these types of controls on your data entry forms to speed data entry, provide tighter data entry validation and control, and give users suggested correct values for the data entry field.
Setting up data-bound lists and combo boxes is a bit trickier than setting up standard data-bound controls. But once you get the hang of it, you'll want to use data-bound lists and combo boxes in every data entry screen you can.
Using the Data-Bound List Box
Although the data-bound list control looks like the standard list control, there are several differences between the two. The data-bound list control has properties that provide the data-binding aspects that are not found in the standard list control (for example, the data-bound list control is self-populating, while the standard list control is not). The first two of these properties are the RowSource and ListField properties of the data-bound list control.
· RowSource: The name of the Recordset object that is providing the data set used to fill the data-bound list box.
· ListField: The name of the column in the RowSource data set that is used to fill the list box. This is the display field for the list.
These two properties are used to bind the list control to a data control. Once these two properties are set, Visual Basic 5 automatically populates the list control for you when you open the data entry form.
Let's start a new project and illustrate the data-bound list control. Once you start the new project, you must make sure you have added the data-bound list controls to your project. Select the Project | Components . . . item from the Visual Basic 5 main menu. Locate and select the Microsoft Data Bound List Controls 5.0 item. Your screen should look like the one in Figure 12.1.

 
< previous page page_452 next page >

If you like this book, buy it!